package cn.cms.model;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class RecommendDetailQuartzJob implements Job {

    private static Logger logger = LoggerFactory.getLogger(RecommendDetailQuartzJob.class);

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        try {
            ScheduleJob scheduleJob = (ScheduleJob) jobExecutionContext.getJobDetail().getJobDataMap().get("scheduleJob");
            String operType = scheduleJob.getOperType();
            if (ScheduleJob.GO_ONLINE.equals(operType)) {
                //执行上线操作
            } else if (ScheduleJob.GO_OFFLINE.equals(operType)) {
                //执行下线操作
            }
        } catch (Exception e) {
            logger.error("", e);
        }
    }
}
